package cn.script.game.dup;

import cn.script.domain.Skill;
import cn.script.game.GameOpt;
import cn.script.game.opt.DupOpt;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 副本信息
 *
 * @author 周永波
 */
public class DupInfo {

    private String dupName;

    private GameOpt gameOpt;

    private List<Skill> defaultSkill;

    private Map<String, DupOpt> optMap = new LinkedHashMap<>();

    public DupInfo(GameOpt gameOpt, String dupName) {
        this.dupName = dupName;
        this.gameOpt = gameOpt;
    }

    public DupInfo(GameOpt gameOpt, String dupName, List<Skill> defaultSkill) {
        this.dupName = dupName;
        this.gameOpt = gameOpt;
        this.defaultSkill = defaultSkill;
    }

    public DupOpt dupOpt(String attName) {
        DupOpt dupOpt = this.gameOpt.dupOpt(this.dupName, attName);
        dupOpt.a_skills(this.defaultSkill);
        this.optMap.put(attName, dupOpt);
        return dupOpt;
    }

    public Map<String, DupOpt> optMap() {
        return this.optMap;
    }
}
